#标量
import numpy as np
#scalar = np.array(1)
#print(scalar.ndim);
#向量
# vector = np.array([1,2])
# print(vector.ndim) 
#矩阵
# matrix = np.array(
#     [
#         [1,2],
#         [3,4]
#     ]
# )
# print(matrix.ndim)
#张量
tensor = np.array(
    [
        [
            [1,2,3,4],
            [5,6,7,8]
        ],
        [
            ["a","b","cd",True],
            [15,16,17,18]
        ]
    ]
)

print(tensor.ndim)